package ruteodosciudades.algoritmo.extra;

/**
 *
 * @author markos
 */
public class Camino  implements Comparable<Camino>{
    public Nodo     dest;   // w
    public double     cost;   // d(w)

    public Camino( Nodo d, double c )
    {
        dest = d;
        cost = c;
    }
    
    @Override
    public int compareTo( Camino rhs )
    {
        double otherCost = rhs.cost;

        return cost < otherCost ? -1 : cost > otherCost ? 1 : 0;
    }
}
